Battery Capacity Characterisation Circuit & Software

 

THIS PAGE IS STILL UNDER CONSTRUCTION

 

This project is to enable the discharge curves and Capacity of various batteries to be measured.

 

A battery under test is discharged through a load, which will vary depending on the type of battery being analysed.  The voltage of the battery and current delivered through the load are monitored by a computer until the battery voltage falls to the minimum discharge level.   The software will then display the capacity of the battery.

 

The unit is controlled via the Parallel port of a PC using Visual Basic.  For more details on programming the parallel port have a look at this pdf file.

 

The main components of the circuit are:

 

Power Supply

This converts the 240V AC mains input to +12V, -12V and +5v.

 

MAX187 12bit Serial A to D Converter and MAX DG508A Multiplexer

Takes inputs from the Voltage Amplifier (Load Current) and Voltage Reducer (Battery Voltage) circuit via the Multiplexer.

 

Relay Control Circuit

            Switches the Load on or off.

 

Voltage Amplifier

Amplifies the Shunt voltage measured across a 0.1ohm resistor in series with the load to bring it within the range of the A to D converter

 

Voltage Reducer Circuit

Reduces the battery voltage to bring it within the range of the A to D converter

 

 

Load

A range of loads will be used depending on the battery type under test. 

 

 

 


Basic Circuit Block Diagram

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


Three Voltage Power Supply

 

This circuit provides a +/- 12V and a +5V supply.

 

+12V:   Relay Coil

            Voltage Amplifier (741 op-amp)

            Multiplexer (MAX DG508A)

           

 

-12V:    Voltage Amplifier (741 op-amp)

            Multiplexer (MAX DG508A)

 

+5V:     AtoD converter (MAX187)

Mona Lisa

+12V Supply ripple under full load with relay coil energised

 

 

 

 

 

 


 

 

 

Load Control Circuit

This circuit consists of the following:

Test Battery. 

For the circuit shown below, this would typically be any Lead Acid battery with a rating of >1Ah.  With different loads, it will be possible to test other batteries.

Load (RL).

This is provided by a load box providing a number of different loads depending on the battery being tested.

Shunt Resistor (Rs)

This enables the circuit current to be measured.  This is a Bare Element Resistor, chosen for its excellent Temperature Coefficient.  The circuit current is equal to : I = Vs / Rs.  In practice I will measure the circuit current using a DMM at different levels and convert the measured voltage into a current reading using software. 

 

Mona LisaRelay

The switching of this relay will be computer controlled; therefore the computer can remove the load when the battery voltage drops below a certain value.

 

Vb= Battery Voltage.

 

Vs = Shunt Voltage (Proportional to Circuit Current)

 

The Load is controlled via the Relay. 

 

EG. 12v, Test Battery

6R Load

Nominal Circuit Current I = Vb/(RL+Rs)

I= 12/6.1 = 2A   (24W)

The voltage developed across Rs should be : V = I * R    

V = 2 * 0.1 = 0.2V (200mV)

 

The computer closes the relay to start the discharge cycle.   In practise we won’t allow the battery to discharge below a certain value.

 

 

 

 

 

 

Test set-up of circuit diagram.

The DMM was used to measure Shunt Voltage (Vs). 

It can be seen that with a 12V (1.3Ah) battery the Shunt voltage is 0.160V. 

The load current measured with the DMM was 1.500A. 

We can now calculate the value of the Shunt Resistor. 

Rs = Vs / I

Rs= 0.160 / 1.5 = 0.107ohms. 

 

The nominal value of the resistor is 0.1ohms.

 

In reality the correlation between Vs and the load current should be checked at different current and voltage levels, as it may vary. This can be compensated for in the software.

 

 

 

 

 


Voltage Amplifier.

 

The voltage measured across the shunt resistor will vary from approximately 0v to 200mV depending on the load used.  The MAX187 AtoD has an input voltage range of 0 to 4v.  The non-inverting amplifier below has a gain of 11, which will give a maximum output voltage of 200mV * 11 = 2.2v. 

 

Gain = (Rf+Rin)/Rin

 

Gain = (47000+4700)/4700 = 11

 

The amplifier was constructed on breadboard and tested as follow:

 

Input Voltage               Output Voltage Gain

50.0mV             0.568V              11.4

123mV              1.362V              11.0

 

So, in practise the 741 gives a gain of approximately 11.

 
Mona Lisa

 

Relay Control Circuit (Load Control).

 

The relay is triggered by the output of b5 of the parallel port.  The relay coil requires 12v to energise.  The resistance of the coil is 200ohms, therefore a current of 12v / 200ohms = 60mA will be drawn.  The parallel port output of 5v at a maximum of 12mA isn’t sufficient to energise the relay coil.  The circuit below will convert the +5v signal from the parallel port to +12v.

 

The diode protects the transistor from back EMF which will be generated when the relay coil is switched off.

 

Mona Lisa

 

Relay Coil Load Current (Ic) = 12v/200R = 60mA

 

Load Current / Max parallel port current

= 60 / 12 = 5.

 

We need a transistor with an hfe >5.  It’s good practise to choose a transistor hfe of 5x this value i.e 25.

 

2N2222A chosen – hfe=100, IC(max)=800mA

 

Calculate value for base resistor:

Rb = (Vc . hfe) / (5 . Ic)

Rb = (12 . 100) / (5 . 0.060) = 4000

Rb = 4k7 chosen.

 

 

 

 

 

 

Voltage Reducer Circuit.

 

The AtoD converter can only accept voltage inputs of up to +4v.  As the max voltage of a battery could be >12V the voltage needs to be scaled down.  A simple potential divider can be used to achieve this.

 

Mona LisaVout = (R1 / (R1 + VR1)) . Vin.

 

Vin is measured from the positive terminal of the battery under test.

 

A test voltage of 13.5V should be inputted and VR1 adjusted to give make Vout 4v.

 

 

 

 

 

 

 

 

 

 

 

 

 

Complete Circuit Diagram, excluding PSU.

Mona Lisa

The Battery Voltage from the Voltage Reducer circuit and the Load Current from the Voltage Amplifier are connected to the S1 & S2 inputs of the multiplexer respectively.  Address line A0 to A3 on the multiplexer are used to select the desired input (S1 or S2).  The multiplexer can take up to 8 inputs, but for this project I am only using two.

 

 

Stripboard Layout

 

 


Constructed unit showing PSU board and interface board mounted in box.

 

 

 

 

Testing the circuit using a simple program written in QuickBasic


 

 

Test Load Box

The test loads are housed within an aluminium casing.  Each load is brought outside the box using banana terminals.

The test box contains the following loads:

 

Load

Suitable Use

2 x 15R (50W) Resistors in Parallel = 7R5

6V & 12V batteries at about 1.7Amps

1.2R (10W) ( Plus 0.1R shunt resistor )

1.2 – 1.5V lower capacity batteries

Typical discharge current is 1Amp.

0.22R (25W) ( Plus 0.1R shunt resistor )

1.2 – 1.5V higher capacity batteries

Typical discharge current is 3.8Amps

47R (25W)

9V batteries.  Typical discharge current is 0.2Amps

 

Note.  If used as above, heat dissipation won’t be a problem.  Only the two 15R resistors in parallel will get hot.  With a fully charged 12V battery, the maximum temperature of the resistors was measured at a maximum of 60°C.    By placing a 12V fan across the two resistors, and drilling ventilation holes around the resistors the temperature dropped to less than 50°C.  The resistors are rated at 200°C.

 

Circuit Diagram

 

 

 

 

 

 

 

 

Examples of Batteries Box

 

Lead Acid BATTERIES

 

LOAD – 2 x 15R (50W) Resistors in Parallel = 7R5

Used for 6 – 12V batteries

Typical discharge current is (12/7.5) 1.6Amps for a 12V battery and 0.8Amps for a 6V battery.

Power dissipated through the resistors will be: (12 * 1.6) 19W

Due to the internal shunt resistor the circuit is limited to 2Amps maximum.

Capacities range from 1200mAh to >10Ah

A 10Ah capacity battery will take >6 hours to test.

 

NiCd & NimH BATTERIES

 

LOAD – 1.2R (10W) ( Plus 0.1R shunt resistor )

Used for 1.2 – 1.5V lower capacity batteries

Typical discharge current is 1Amp for a NiCd or NimH

Power dissipated through the resistor will be: (1.2 * 1) 1.2W

AAA, AA capacities range from 600mAh to 2600mAh

Discharge time at 600mAh = 0.6 hours

Discharge time at 2600mAh = 2.6 hours

 

LOAD – 0.22R (25W) ( Plus 0.1R shunt resistor )

Used for 1.2 – 1.5V higher capacity batteries

Typical discharge current is 3.8Amps for a NiCd or NimH

Power dissipated through the resistor will be: (1.2 * 3.8) 4.6W

D cells have ratings up to 11,000mAh

Discharge time at 11,000mAh = 2.9 hours

 

LOAD – 47R (25W)

Used for 9V batteries

Typical discharge current is 0.19Amps for a NiCd or NimH

Power dissipated through the resistor will be: (9 * 0.19) 1.7W

PP3 capacities range from 100mAh to 300mAh

Discharge time at 100mAh = 0.5 hours

Discharge time at 300mAh = 1.5 hours

 

 

Calibration

 

The analyser was powered up with a 12v, 20W lamp as a load. 

 

A 12V, 1300mAh Lead Acid  battery.

 

Voltage

The analyser was set to measure battery voltage and the output of the AtoD converter recorded.  The AtoD converter output will be a value between 0 and 4096 (12 bit AtoD).  To calibrate the output, we need to measure the actual battery voltage using a DMM.

 

AtoD Output      Actual Battery Voltage

3620                 12.17V

 

If we now divide the AtoD Output by the battery voltage we get a calibration factor of : 3620 / 12.17 = 297.5

For the software to display the actual battery voltage all it needs to do is divide the AtoD output by the calibration factor.

 

Current

The analyser was set to measure current and as above, the AtoD converter output recorded.  The actual current was measured using a DMM in series with the battery and load.

 

AtoD Output      Actual Battery Current

1860                                  1546mA

 

If we now divide the AtoD Output by the current we get a calibration factor of : 1860 / 1546 = 1.203

For the software to display the actual current all it needs to do is divide the AtoD output by the calibration factor.

 

 

A 1.2V, 2600mAh NiMi battery

 

Voltage

AtoD Output      Actual Battery Voltage   Cal Factor

327                   1.140                            286.8

 

Current

AtoD Output      Actual Battery Current    Cal Factor

636                   523mA                          1.216

 

 

Now that the Cal Factor has been calculated at two different extremes, we can work out the linearity of the analyser.  At 12V the cal factor is 297.5.  At 1.2V the cal factor is 286.8.  The percentage difference between the two cal factors is: 3.6%.  So, the analyser can measure the battery voltage with a linearity of at least 3.6% between 1.2V and 12V

 

Likewise, for Current:

Cal factor at 523mA = 1.216

Cal Factor at1546mA = 1.203

Linearity between 523mA and 1546mA = 0.25%

 

 

NOTE : This circuit is only suitable for analysing batteries up to 12V.    By up-rating the relay there should be no problems with using higher voltage batteries and higher current loads, although the shunt resistor may also have to be up-rated or mounted on a heat sink.


Discharge levels for batteries

 

Lead Acid

This voltage should be measured after the battery has been in a state of rest for at least 3 hours.

State of Charge

12V battery

 

 

 

 

 

Divide the voltages by twp for a Six Volt battery and multiply them by two for a 24Volt battery.

100

12.7

90

12.5

80

12.42

70

12.32

60

12.20

50

12.06

40

11.90

30

11.75

20

11.58

10

11.31

0

10.5

 

Battery Recovery after discharge

To determine what the safe discharge level for the battery under load is the following measurements were made.

 

Lead Acid

Battery Type

Load

Discharge Current (Amps)

End Discharge Battery Voltage

Recovery Voltage after 3 hours rest.

State of charge after recovery

Notes

12v 1300mAh

12v, 20W tungsten lamp

1.7

9.9v

12.1

50%

Can go lower than 9.9v during discharge

6v 2800mAh

12v, 20W tungsten lamp

1.1

4.8v

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

NiCd

Battery voltage drops sharply near the end of the discharge cycle. 

Battery Type

Size

Load

Discharge Current (Amps)

End Discharge Battery Voltage

Notes

 

AAA

 

 

 

 

1.2v, 800mAh

AA

1R 10W resistor

0.6

0.2v

 

 

C

 

 

 

 

 

D

 

 

 

 

 

PP3

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

NiMh

Battery voltage drops sharply near the end of the discharge cycle. 

Battery Type

Size

Load

Discharge Current (Amps)

End Discharge Battery Voltage

Notes

 

AAA

 

 

 

 

1.2v, 2600mAh

AA

1R 10W resistor

0.9

0.3v

 

 

C

 

 

 

 

 

D

 

 

 

 

 

PP3

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Interfacing with the Parallel Port.

 

The Data Register and the Status Register of the parallel port are used to interface with the circuit.

 

Parallel Port Output/Input Lines

Parallel Port Data Register

b0

b1

b2

b3

b4

b5

b6

b7

Circuit Board

A0

A1

A2

CS

SCLK

RELAY CONTROL

x

x

 

DG508A Multiplexer Input Select

MAX 187 AtoD

Switches Load

NC

NC

 

Status Register

Bit 5 of the Status Register is connected to Dout of the Max 187 AtoD.

 

 

MAX 187 12bit Serial AtoD Converter Pin out:

1

VDD

Supply voltage, +5V ±5%

2

AIN

Sampling analogue input, 0V to VREF range

3

 

SHDN

Pulling SHDN high enables the internal reference

4

REF

Reference voltage - Sets analogue voltage range to 4.096V.

5

GND

Digital ground

6

DOUT

DOUT Serial data output. Data changes state at SCLK’s falling edge.

7

 

CS

Active-low Chip Select initiates conversions on the falling edge. When CS is high,

DOUT is high impedance.

8

SCLK

Serial clock input. Clocks data out with rates up to 5MHz.

 

DG508A Multiplexer Pin out:

1,15,16

A0,A1,A2

Address Inputs

2

EN

Enable – High to enable chip

3 & 13

V-

Supply voltage +/-18V max

4,5,6,7,9,10,11,12

S1 to S7

Signal Input Lines

8

D

Switched Signal Output

14

GND

Ground (0v)

 

 

A 9 pin D type socket was selected for the battery analyser housing.  A standard 25 pin D-type printer cable was used and a 9 pin D type plug placed on the other end wired as below:

25 Pin D-type connected to PC Parallel Port

9 Pin D Type

Parallel Port Output / Input

Circuit Connection

Pin Number

Wire Colour

Pin Number

 

 

2

Red

5

data 0

Multiplexer A0

3

Orange

4

data 1

Multiplexer A1

4

Pink

3

data 2

Multiplexer A2

5

Yellow

2

data 3

A to D  CS

6

Green

1

data 4

A to D SCLK

7

Light Blue

6

data 5

Relay Control

11

White

7

Busy

A TO D Dout

25

Black/Grey

8

GND (0v)

GND (0v)

           

 

 

 


 

 

Software.

The software has been written using Visual Basic 6 and can be downloaded directly from this link

The link contains the full source code ready to be loaded into Visual Basic.